// 解析 BigInt 对象

let names ;

console.log( '- - - - - BigInt静态属性 - - - - -' );

names = Object.getOwnPropertyNames( BigInt );
console.log( names );

console.log( '- - - - - BigInt原型属性 - - - - -' );

names = Object.getOwnPropertyNames( BigInt.prototype );
console.log( names );

console.log( '- - - - - BigInt"无"构造 - - - - -' );

let x = 100n ;
console.log( x , typeof x );

let y = BigInt( '100200300' ); // BigInt可以当作转换函数使用
// let y = new BigInt( x ); // TypeError: BigInt is not a constructor
console.log( y , typeof y );

// 应该如何将 bigint 类型的原始值包裹到 BigInt 的一个实例中
let instance = new Object( 20210922n ); // 利用Object构造函数实现
console.log( instance , typeof instance );

instance = Object( 20210922094230n ); // 通过调用Object函数实现
console.log( instance , typeof instance );

console.log( instance.toString() );
console.log( instance.toLocaleString() );

let p = instance.valueOf() ;
console.log( p , typeof p );

console.log( instance.constructor === BigInt.prototype.constructor ); // true
console.log( instance.constructor === BigInt ); // true
console.log( BigInt.prototype.constructor === BigInt ); // true